<template>
  <div class="container">
    <div class="affair">
      <div class="affair-title">
        <div class="title">
          <img class="search" src="../../assets/index/search.png" alt="" />
          筛选查询
        </div>
        <div class="button">
          <div class="button_search">
            <el-button class="el-button" @click="getSearchList">查询结果</el-button>
          </div>
          <div class="button_advanced">
            <slot name="advanced-search"></slot>
          </div>
        </div>
      </div>
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'search',
  props: ['formInline'],
  components: {},

  data() {
    return {}
  },

  mounted() {},

  methods: {
    getSearchList() {
      if (this.formInline) {
        this.$emit('getSearchList', this.formInline)
      }
    },
  },
}
</script>

<style scoped>
/* 搜索小图标 */
.container {
  width: 100%;
}
.search {
  width: 20px;
  height: 20px;
  padding-top: 10px;
}

.affair {
  width: 98%;
  /* height: 200px; */
  height: auto;
  margin-top: 20px;
  margin-left: 15px;
  margin-right: 150px;
  border: 1px solid #e4e4e4;
  background-color: white;
}
.affair-title {
  position: relative;
  display: flex;
  padding-left: 20px;
  height: 50px;
  line-height: 50px;
  color: #666666;
  font-size: 15px;
  font-weight: 600;
  background-color: #f3f3f3;
}
.title {
  width: 200px;
}
.button {
  display: flex;
  position: absolute;
  right: 100px;
}
.button_search {
  margin-right: 10px;
}
.el-button {
  margin-top: 6px;
  width: 100px;
  height: 40px;
}
</style>
